objects= md5.o util.o url.o dict_manager.o\
	download_manager.o\
	schema_manager.o schema_operate.o url_schema.o\
	pending_schema.o keyword.o keyword_schema.o\
	invalid_schema.o dict_schema.o log.o parse.o page.o\
	conf.o main.o 

CC=g++
CFLAGS=-g -Wall -D_MYDEBUG_
LIBS=./myxml/libmyxml.a
VPATH=./myxml

webrobot:$(objects)
	$(CC) $(CFLAGS) -o webrobot  $(objects) -lcurl -lpthread  -L/user/lib/mysql -lmysqlclient $(LIBS)
	
md5.o: md5.h md5.cpp 
	$(CC) $(CFLAGS) -c md5.cpp
util.o: util.h util.cpp 
	$(CC) $(CFLAGS) -c util.cpp	
url.o: url.h url.cpp
	$(CC) $(CFLAGS) -c url.cpp
keyword.o:keyword.h keyword.cpp
	$(CC) $(CFLAGS) -c keyword.cpp	
dict_manager.o: dict_manager.h dict_manager.cpp
	$(CC) $(CFLAGS) -c dict_manager.cpp	
schema_manager.o: schema_manager.h schema_manager.cpp
	$(CC) $(CFLAGS) -c schema_manager.cpp -I/usr/include/mysql	
schema_operate.o: schema_operate.h schema_operate.cpp
	$(CC) $(CFLAGS) -c schema_operate.cpp -I/usr/include/mysql		
keyword_schema.o:keyword_schema.h keyword_schema.cpp
	$(CC) $(CFLAGS) -c keyword_schema.cpp  -I/usr/include/mysql	
url_schema.o: url_schema.h url_schema.cpp
	$(CC) $(CFLAGS) -c url_schema.cpp -I/usr/include/mysql		
pending_schema.o: pending_schema.h pending_schema.cpp
	$(CC) $(CFLAGS) -c pending_schema.cpp -I/usr/include/mysql
invalid_schema.o: invalid_schema.h invalid_schema.cpp
	$(CC) $(CFLAGS) -c invalid_schema.cpp -I/usr/include/mysql	
dict_schema.o: dict_schema.h dict_schema.cpp
	$(CC) $(CFLAGS) -c dict_schema.cpp -I/usr/include/mysql					
log.o: log.h log.cpp
	$(CC) $(CFLAGS) -c log.cpp				
download_manager.o: download_manager.h download_manager.cpp 
	$(CC) $(CFLAGS) -c download_manager.cpp		
parse.o: parse.h parse.cpp 
	$(CC) $(CFLAGS) -c parse.cpp		
page.o: page.h page.cpp 
	$(CC) $(CFLAGS) -c page.cpp		
conf.o: conf.h conf.cpp 
	$(CC) $(CFLAGS) -c conf.cpp		
main.o: main.cpp  
	$(CC) $(CFLAGS) -c main.cpp


.PHONY:clean
clean:	
	-rm webrobot $(objects)

